<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 300px;
            height: 300px;
            background-color: aqua;
            font-size: 20px;
            display: none;
        }
    </style>
</head>

<body>
    <input type="text">
    <div class="con"></div>
</body>
<script>
    var input = document.querySelector('input');
    document.addEventListener('keyup', function (e) {
        if (e.keyCode === 83) {
            input.focus();
        }
    })
    var div = document.querySelector('.con');
    input.addEventListener('keyup', function () {
        if (input.value == '') {
            div.style.display = 'none';
        } else {
            div.style.display = 'block';
            div.innerText = this.value;
        }
    })
    input.addEventListener('blur', function () {
        div.style.display = 'none'
    })
    input.addEventListener('focus', function () {
        if (this.value !== '')
            div.style.display = 'block';
    })
</script>

</html>